package com.schoolai.tts.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.schoolai.tts.service.CosyVoiceService;
import com.schoolai.util.base.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright(C),2019-2025，XX公司
 * FileName:Voice
 * Author:
 * 创建时间：2025/9/30 14:21
 * Description:
 * History:
 * <auth>        <time>       <version>       <desc>
 * 作者          修改时间       版本号         描述
 */
@Slf4j
@RequestMapping("/Voice")
@Tag(name = "语音管理", description = "语音管理")
@RestController
public class VoiceTest {
    @Autowired
    CosyVoiceService cosyVoiceService;
    @Operation(summary = "生成语音文件")
    @ApiOperationSupport(order = 1)
    @GetMapping("/genVoiceFile")
    Result genVoiceFile(){
        cosyVoiceService.genVoiceFile("我爱你祖国");
        return Result.ok("语音文件生成完成");
    }
}
